<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>上海派毅智能科技有限公司</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
		<meta name="keywords" content="上海派毅智能科技有限公司，机器人，人工智能，服务机器人" />
		<meta name="description" content="上海派毅智能科技有限公司" />
		<META HTTP-EQUIV="pragma" CONTENT="no-cache">
		<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
		<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT"> 
		<META HTTP-EQUIV="expires" CONTENT="0">
		<link rel="icon" type="image/x-icon" href="images/favicon.ico">
		<link rel="stylesheet" type="text/css" href="css/pi2e.css" />
	</head>

	<body onload="getNews()">
		<div class="header">
			<div class="header_logo">
				<a href="index.html"><img src="images/logo.png" /></a>
			</div>
			<ul class="header_title">
				<li>
					<a href="index.html" class="pro">首页</a>
				</li>
				<li class="pro_leave">
					<a href="product_two.html">产品</a>
					<ul class="pro_list">
						<li>
							<a href="product_two.html">大毅</a>
						</li>
						<li>
							<a href="product_one.html">智兔</a>
						</li>
					</ul>
				</li>
				<li>
					<a href="system.html">系统</a>
				</li>
				<li>
					<a href="news.html">新闻</a>
				</li>
				<li>
					<a href="introduce.html">关于</a>
				</li>
				<li>
					<a href="contact.html">加入</a>
				</li>
				<li>
					<a href="http://i.youku.com/i/UMzY2NDA0Njk5Ng==?spm=a2h0j.11185381.module_basic_dayu_sub.DL~DT~A" target="_blank">更多</a>
				</li>
			</ul>
		</div>
		<div class="main">
			<div class="main_img">
				<img src="images/news.png" />
			</div>
		</div>
		<div class="footer">
			<a href="product_two.html">产品</a>
			<a href="system.html">系统</a>
			<a href="introduce.html">关于我们</a>
			<a href="contact.html">加入我们</a>
			<a href="network.html">网络条款</a>
			<img src="images/pylogo.png" alt="" class="footer_logo" />
			<div class="footer_pyzn">派毅智能</div>
			<div class="footer_pyzne">Passion & Innovation</div>
			<div class="footer_pyznkj">上海派毅智能科技有限公司</div>
			<div class="footer_pyznekje">Passion & Innovation Technology (Shanghai) Co</div>
			<div class="footer_pygzh">
				<div><img src="images/qccode.jpg" /></div>
				<div>关注“派毅智能”公众号</div>
			</div>
			<div class="footer_beian">
				<div>©2013-2016; Passion & Innovation Technology (Shanghai) Co.沪ICP备15008508号</div>
				<div><img src="images/gongan.png" /><span>沪公网安备 31010402002108号</span></div>
			</div>
		</div>
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript">
			//获得年月日      得到日期oTime  
			function getMyDate(str) {
				var oDate = new Date(str),
					oYear = oDate.getFullYear(),
					oMonth = oDate.getMonth() + 1,
					oDay = oDate.getDate(),
					oTime = oYear + '-' + getzf(oMonth) + '-' + getzf(oDay); //最后拼接时间  
				return oTime;
			};
			//补0操作  
			function getzf(num) {
				if(parseInt(num) < 10) {
					num = '0' + num;
				}
				return num;
			}
            // 获取新闻
			function getNews() {
				$.ajax({
					contentType: "application/json;charset=utf-8",
					type: "POST", //提交方式  
					url: "http://robot-console.pi2e.com/ofWeb/news/list", //路径  
					data: JSON.stringify({
						rows: '10',
						page: '1',
						criteria: {
							'newsTitle': ''
						}
					}), //数据，这里使用的是Json格式进行传输 
					success: function(result) { //返回数据根据结果进行相应的处理  
						console.log(result);
						console.log(JSON.parse(result).datas)
						var data = JSON.parse(result).datas;
						for(var i = 0; i < data.length; i++) {
							console.log(data[i].newsContent)
							var content = "<div class='main_item'><div class='main_itemTitle' id='news_title'><a href='" + data[i].newsUrl + "' target='_blank'>" + data[i].newsTitle + "</a></div>\
							<div class='main_itemTime'>" + getMyDate(data[i].newsCreatetime) + "</div>\
							<div class='main_itemImg'><img src='" + data[i].newsMainpicurl + "'/></div><div class='main_itemContent'>" + data[i].newsContent + "</div>\
							<div class='main_itemContentmore'><a href='" + data[i].newsUrl + "' target='_blank'>查看更多>></a></div></div>"
							$('.main').append(content);
						}
					},
					error: function() {}
				});
			}
		</script>
	</body>

</html>